<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
		<title>OpenGL ES</title>
        <!--Vertex shader-->
        <script id="vertexShader" type="x-shader/x-vertex">
			attribute vec4 position;
            //attribute vec3 color;
            //varying vec3 vColor;
            //vColor=color;
			uniform mat4 Mmatrix;
			void main(void) {
				gl_Position = position * Mmatrix;
			}
		</script>
        <script id="shader_vertex_source" type="x-shader/x-vertex">
			attribute vec3 position;
            uniform mat4 Pmatrix;
            uniform mat4 Vmatrix;
            uniform mat4 Mmatrix;
            attribute vec3 color;
            varying vec3 vColor;
            void main(void) { 
                //pre-built function
                gl_Position = Pmatrix*Vmatrix*Mmatrix*vec4(position, 1.);
                vColor=color;
            }
		</script>
		<!--Fragment shader-->    
        <script id="fragmentShader" type="x-shader/x-fragment">
			//varying vec3 vColor;
            void main(void) {
                //gl_FragColor = vec4(vColor, 1.);            
				gl_FragColor = vec4(1.0,0.5,0.75,1.0);
			}
		</script>
        <script id="shader_fragment_source" type="x-shader/x-fragment">
			precision mediump float;
            varying vec3 vColor;
            void main(void) {
                gl_FragColor = vec4(vColor, 1.);
            }
		</script>	
		<script src="./matrix.js"></script><style type="text/css"></style>	
	</head>
	<body>
		<canvas height="720" width="1280"></canvas>
		<script src="./script.js"></script>
    </body>
</html>